﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace WinnerCMS.WebFactory.Bundles
{
    [DataContract]
    public class BundleConfig
    {
        public BundleConfig()
        {
            ScriptBundle = new Bundle[] {};
            StyleBundle = new Bundle[] {};
        }

        [DataMember]
        public bool EnableOptimizations { get; set; }

        [DataMember]
        public Bundle[] StyleBundle { get; set; }

        [DataMember]
        public Bundle[] ScriptBundle { get; set; }

        [DataContract]
        public class Bundle
        {
            private string[] _files = { };

            [DataMember]
            public string VirtualPath { get; set; }

            [DataMember]
            public bool AutoPath { get; set; }

            [DataMember]
            public string[] Files
            {
                get { return _files; }
                set { _files = value; }
            }
        }
    }
}